package com.java.grammer.arrays;

/**
 * @author luzhikun
 * @date 2020/11/28- 17:57
 */
public class Arrays_1 {
    public static void main(String[] args) {
        int[] a = new int[]{1, 3, 5, 6, 7, 8, 90};
        a[3] = 10;
        for (int i = 0; i < a.length - 1; i++) {
            for (int j = 0; j < a.length - 1 - i; j++) {
                if (a[j] > a[j + 1]) {
                    int t = a[j];
                    a[j] = a[j + 1];
                    a[j + 1] = t;
                }
            }
        }
        for (int i = 0; i < a.length; i++) {
            System.out.print(a[i] + " ");
        }
    }
}
